fix(worker): gate workflow orchestration diagnostics#17
Merged
Conversation
Signed-off-by: zebbern <185730623+zebbern@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR reduces Temporal workflow orchestration noise by routing routine lifecycle diagnostics through the existing SENTRIS_DEBUG_WORKFLOW-gated workflowDiagnosticLog() helper, and adds regression tests to ensure “quiet by default” behavior across core workflow paths.
Changes:
- Replaced
console.logworkflow lifecycle messages in the main orchestrator, tool-mode handler, and human-input handler withworkflowDiagnosticLog()(gated bySENTRIS_DEBUG_WORKFLOW=1). - Added regression tests ensuring successful workflow/tool/human-input paths do not write to
console.logby default.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| worker/src/temporal/workflows/tool-mode-handler.ts | Gates tool-mode registration “happy-path” diagnostics behind workflowDiagnosticLog() instead of console.log. |
| worker/src/temporal/workflows/index.ts | Gates most workflow orchestration lifecycle chatter behind workflowDiagnosticLog() and keeps existing warn/error logs for some cases. |
| worker/src/temporal/workflows/human-input-handler.ts | Gates human-input lifecycle diagnostics behind workflowDiagnosticLog() instead of console.log. |
| worker/src/temporal/workflows/tests/workflow-diagnostics.test.ts | Adds tests verifying no console.log output in successful workflow/tool/human-input paths when debug flag is unset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+221
to
+223
| workflowDiagnosticLog( | ||
| `[Workflow] Tool call failed: callId=${request.callId}, error=${errorMessage}`, | ||
| ); |
|
|
||
| if (!signalReceived) { | ||
| console.log(`[Workflow] Human input timeout for ${actionRef}`); | ||
| workflowDiagnosticLog(`[Workflow] Human input timeout for ${actionRef}`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test Plan